//
//  CTVMenuElement.m
//  Channltv
//
//  Created by Bruno Keymolen on 7/5/07.
//  Copyright 2007 channl.tv. All rights reserved.
//
// DEPRECATED


#import "CTVMenuElement.h"


@implementation CTVMenuElement


-(int) setProgram:(CTVClip*)prog{
	m_program = prog;
	return 0;
}

-(void) dealloc{ 
	[m_name release];
	[m_submenu release];
	[m_iconname release];
		
		
	[super dealloc]; //do not forget to transmit to the superclass 
} 


-(id) initWithName:(NSString*)name{
	return [self initWithName:name andFunction:nil andSubMenu:nil];
}


-(id) initWithName:(NSString*)name andFunction:(SEL)func{
	return [self initWithName:name andFunction:func andSubMenu:nil];
}


-(id) initWithName:(NSString*)name andFunction:(SEL)func andSubMenu:(id)submenu{
		
	return [self initWithName:name andFunction:func andSubMenu:submenu andIcon:nil];
}

-(id) initWithName:(NSString*)name andFunction:(SEL)func andSubMenu:(id)submenu andIcon:(NSString*)iconname{
	[super init];
	
	m_func = func;
	m_name = name;
	m_submenu = submenu;
	m_iconname = iconname;
		
	[m_name retain];
	[m_submenu retain];
	[m_iconname retain];
			
	return self; 
}


-(NSString*)name{
	return m_name;
}

-(NSString*)iconname{
	return m_iconname;
}

-(void)setIconName:(NSString*)iconname{
	[iconname retain];
	[m_iconname release];
	m_iconname = iconname;
}


-(void) setChannel:(CTVChannel*)channel{
	[channel retain];
	[m_channel release];
	m_channel = channel;
}

-(CTVChannel*)channel{
	return m_channel;
}

-(void) setFunc:(SEL)func{
	m_func = func;
}

-(SEL)func{
	return m_func;
}


-(void) setSubmenu:(id)submenu{
	[submenu retain];
	[m_submenu release];
	m_submenu = submenu;
}

-(id)submenu{
	return m_submenu;
}


-(void) setSubname:(id)subname{
	m_subname = subname;
}

-(id)subname{
	return m_subname;
}

-(void) setClip:(CTVClip*)clip{
	m_program = clip;
}

-(CTVClip*)clip{
	return m_program;
}

-(void)setType:(CTVMenuElementType)type{
	m_type = type;
}
-(CTVMenuElementType)type{
	return m_type;
}

-(void)setLeftIcon:(BRTexture*)icon{
	m_leftIcon = icon;
}
-(BRTexture*)leftIcon{
	return m_leftIcon; 
}

-(void)setRightIcon:(BRTexture*)icon{
	m_rightIcon = icon;
}
-(BRTexture*)rightIcon{
	return m_rightIcon; 
}


@end
